@layout("/common/_container.html"){
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>预约直接上门客户</h5>
            </div>
            <div style="display: none">
                <input type="hidden" id="id" value="">
                <input type="hidden" id="userName" value="${userName}">
                <input type="hidden" id="oneChannelValue" value="">
                <input type="hidden" id="twoChannelValue" value="">
                <input type="hidden" id="thrChannelValue" value="">
            </div>
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="row">
                            <div class="col-sm-3 fatherBtn">
                                <#NameCon id="customerName" name="客户姓名" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#NameCon id="customerPhone" name="电话" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#NameCon id="archiving" name="建档人" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <div class="archiving_btn search_bt search_bt_selt"
                                     onclick="Reservations.getArchiving()">选择
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-1 btn addBtn addBtn_x1">状态</label>
                            <div class="col-sm-2 addBtn_y1">
                                <select class="form-control" id="status" name="status">
                                    <option value="">全部</option>
                                    <option value="预约">预约</option>
                                    <option value="到店">到店</option>
                                </select>
                            </div>
                            <label class="col-sm-1 btn addBtn addBtn_x1">状态2</label>
                            <div class="col-sm-2 addBtn_y1">
                                <select class="form-control" id="statuss" name="statuss">
                                    <option value="">全部</option>
                                    <option value="预约">预约</option>
                                    <option value="待定">待定</option>
                                    <option value="跟进">跟进</option>
                                    <option value="过期">过期</option>
                                </select>
                            </div>
                            <label class="col-sm-1 btn addBtn addBtn_x2">访问病种</label>
                            <div class="col-sm-2 addBtn_y2">
                                <select class="form-control" id="accessDisease" name="status">
                                    <option value="">全部</option>
                                    <option value="种植">种植</option>
                                    <option value="正畸">正畸</option>
                                    <option value="修复">修复</option>
                                    <option value="美白">美白</option>
                                    <option value="拔牙智齿">拔牙智齿</option>
                                    <option value="牙周">牙周</option>
                                    <option value="洗牙洁牙">洗牙洁牙</option>
                                    <option value="医院类">医院类</option>
                                    <option value="儿童齿科">儿童齿科</option>
                                </select>
                            </div>
                            <label class="col-sm-1 btn addBtn addBtn_x2">预约项目</label>
                            <div class="col-sm-2 addBtn_y2">
                                <select class="form-control" id="appointmentPayService" name="appointmentPayService">
                                </select>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-3 fatherBtn">
                                <#TimeCon id="startFilingTime" name="建档时间" isTime="true"  pattern="YYYY-MM-DD hh:mm:ss" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#TimeCon id="endFilingTime" name="-" isTime="true"  pattern="YYYY-MM-DD hh:mm:ss" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#TimeCon id="startRevisitTime" name="预约回访时间" isTime="true"  pattern="YYYY-MM-DD hh:mm:ss" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#TimeCon id="endRevisitTime" name="-" isTime="true"  pattern="YYYY-MM-DD hh:mm:ss" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#TimeCon id="startArrivalTime" name="到店时间" isTime="true"  pattern="YYYY-MM-DD hh:mm:ss" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#TimeCon id="endArrivalTime" name="-" isTime="true"  pattern="YYYY-MM-DD hh:mm:ss" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#TimeCon id="startAppointmentArrivalTime" name="预约到店时间" isTime="true"  pattern="YYYY-MM-DD hh:mm:ss" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#TimeCon id="endAppointmentArrivalTime" name="-" isTime="true"  pattern="YYYY-MM-DD hh:mm:ss" />
                            </div>
                            <label class="col-sm-1 btn addBtn addBtn_x2">预约门诊</label>
                            <div class="col-sm-2 addBtn_y2">
                                <select class="form-control" id="outpatientName" name="outpatientName">
                                </select>
                            </div>
                            <div class="form-groups">
                                <label class="col-sm-1 control-label">是否回访</label>
                                <div class="col-sm-2">
                                    <select class="form-control" id="isReturnVisit" name="isReturnVisit">
                                        <option value="0">全部</option>
                                        <option value="1">是</option>
                                        <option value="2">否</option>
                                        <option value="3">已回访</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#NameCon id="reservationsNum" name="预约号" />
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#NameCon id="wechatNumber" name="微信号" />
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-1 btn addBtn addBtn_x2">一级渠道</label>
                            <div class="col-sm-2 addBtn_y2">
                                <select class="form-control" id="oneChannel" name="oneChannel">
                                </select>
                            </div>
                            <label class="col-sm-1 btn addBtn addBtn_x2">二级渠道</label>
                            <div class="col-sm-2 addBtn_y2">
                                <select class="form-control" id="twoChannel" name="twoChannel">
                                </select>
                            </div>
                            <label class="col-sm-1 btn addBtn addBtn_x2">三级渠道</label>
                            <div class="col-sm-2 addBtn_y2">
                                <select class="form-control" id="thrChannel" name="thrChannel">
                                </select>
                            </div>
                            <div class="col-sm-3 fatherBtn">
                                <#NameCon id="tcName" name="初诊tc" />
                            </div>
                            <label class="col-sm-1 btn addBtn addBtn_x2">部门</label>
                            <div class="col-sm-2 addBtn_y2">
                                <select class="form-control" id="department" name="department">
                                    <option value="">全部</option>
                                    <option value="网电咨询">网电咨询</option>
                                    <option value="电销咨询">电销咨询</option>
                                    <option value="公共池">公共池</option>
                                    <option value="地推">地推</option>
                                    <option value="新媒体">新媒体</option>
                                    <option value="老带新">老带新</option>
                                    <option value="直接上门">直接上门</option>
                                </select>
                            </div>
                            <div class="col-sm-3">
                                <div class="search_bt" onclick="Reservations.search()">搜索</div>
                                <div class="search_bt" onclick="Reservations.resetSearch()">重置</div>
                            </div>
                        </div>
                        <div class="hidden-xs" id="ReservationsTableToolbar" role="group">
                            @if(shiro.hasPermission("/reservations/add")){
                            <div class="other_bt" onclick="Reservations.openAddReservations()">建档</div>
                            @}
                            @if(shiro.hasPermission("/reservations/delete")){
                            <div class="other_bt" onclick="Reservations.delete()">删除</div>
                            @}
                            @if(shiro.hasPermission("/reservations/supplement")){
                            <div class="other_bt" onclick="Reservations.supplement()">补单</div>
                            @}
                            @if(shiro.hasPermission("/reservations/AdministratorsUpdate")){
                            <div class="other_bt" onclick="Reservations.AdministratorsUpdate()">管理员修改</div>
                            @}
                            @if(shiro.hasPermission("/reservations/internetAdministratorsUpdate")){
                            <div class="other_bt" onclick="Reservations.internetAdministratorsUpdate()">网电管理员修改</div>
                            @}
                            <div class="other_bt" onclick="Reservations.uploadCustomer()">导入到店患者</div>
                            <div class="other_bt" onclick="Reservations.monthReservations()">本月建档</div>
                            <div class="other_bt" onclick="Reservations.yesterdayReservations()">昨日建档</div>
                            <div class="other_bt" onclick="Reservations.todaySearch()">今日建档</div>
                            <div class="other_bt" onclick="Reservations.monthdayArrive()">本月到店</div>
                            <div class="other_bt" onclick="Reservations.yesterdayArrive()">昨日到店</div>
                            <div class="other_bt" onclick="Reservations.todayArrive()">今日到店</div>
                            <div class="other_bt" onclick="Reservations.todaySupplement()">今日回访</div>
                            <div class="other_bt" onclick="Reservations.tomorrowSupplement()">明日回访</div>
                            <div class="other_bt" onclick="Reservations.reservationsExport()">导出</div>
                            <div class="other_bt" onclick="Reservations.addChatRecord()">添加咨询内容</div>
                        </div>
                        <#table id="ReservationsTable"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/marketing/reservations/reservations-directly.js"></script>
<script src="${ctxPath}/static/js/common/jsChannel.js"></script>
<script>
    var oneChanneli = document.getElementById("oneChannelValue").value;
    var twoChanneli = document.getElementById("twoChannelValue").value;
    var thrChanneli = document.getElementById("thrChannelValue").value;
    $.post(Feng.ctxPath + "/channel/getChannelsss", function (data) {
        ChannelList = data;
        channelInit('oneChannel', 'twoChannel', 'thrChannel');
    }, "json");
</script>
<style>
    .search_bt_selt {

    }

    .addBtn_y1 {
        position: relative;
        left: 0;
    }

    .addBtn_x1 {
        position: relative;
        left: 15px;
    }

    .addBtn_y2 {
        position: relative;
        left: -5px;
    }

    .addBtn_x2 {
        position: relative;
        left: 10px;
    }

    .addBtn_y3 {
        position: relative;
        left: -11px;
    }

    .addBtn_x3 {
        position: relative;
        left: 4px;
    }

    .search_bt, .other_bt {
        cursor: pointer;
        display: inline-block;
        width: 115px;
        height: 27px;
        line-height: 27px;
        color: white;
        text-align: center;
        font-size: 14px;
        border-radius: 20px;
    }

    .search_bt {
        background: url("${ctxPath}/static/img/x18.png") no-repeat;
        background-size: cover;
    }

    .other_bt {
        background: url("${ctxPath}/static/img/x19.png") no-repeat;
        background-size: cover;
    }

    td a {
        display: block;
        width: 150%;
        position: relative;
        left: -25%;
    }
</style>
@}
